var imgsObj = document.querySelectorAll('.ul1>li');
    var olLi = document.querySelectorAll('ol Li');
    var prev = document.getElementById('goPrev');
    var next = document.getElementById('goNext');
    let lbt = document.querySelector('.lbt')
    var prevIndex = 0;
    var index = 0;
    Array.from(olLi).forEach((ele, key) => {
      ele.onclick = () => {
        prevIndex = index;
        index = key;
        change();
      }
    });
    prev.onclick = () => {
      prevIndex = index;
      index--;
      if (index < 0) index = imgsObj.length - 1;
      change();
    }
    next.onclick = () => {
      prevIndex = index;
      index++;
      if (index > (imgsObj.length - 1)) index = 0;
      change();
    }
    var times = '';
    function autoPlay() {
      clearInterval(times);
      times = setInterval(() => {
        next.onclick();
      }, 3000)
    }
    autoPlay();
    lbt.onmouseenter = function () {
      clearInterval(times);
    }
    lbt.onmouseleave = function () {
      autoPlay();
    }
    function change() {
      imgsObj[prevIndex].classList.remove('ac');
      olLi[prevIndex].classList.remove('ac');
      imgsObj[index].classList.add('ac');
      olLi[index].classList.add('ac');
    }